/*
 * @Description: 类型
 * @Author: chenju
 * @Date: 2021-10-22 14:22:54
 * @LastEditors: qingyang
 * @LastEditTime: 2023-06-29 10:30:48
 */
import { SystemFileFileCodeEnum, SystemFileGroupCodeEnum } from '@/constants/enum';

// 获取系统配置文件入参
export interface GetSysFileParams {
  // 文件分组
  groupCode: keyof typeof SystemFileGroupCodeEnum;
  // 文件标志
  fileCode: keyof typeof SystemFileFileCodeEnum;
}
// 获取系统配置文件 返回参数
export interface GetSysFileResult {
  // 文件名称
  fileName: string;
  // 文件url
  fileUrl: string;
  // 文件版本
  fileVersion: string;
}

//  获取全部组织列表  入参
export interface getListOrganizationParams {
  // 组织名称
  organizationName: string;
}

export interface ISysFileParams {
  application: string;
  groupCode: string;
  fileCode: string;
}

export interface IAddFeedBack {
  scope: string;
  feedbackContent: string;
  attachmentUrl?: string;
  attachmentSmallUrl?: string;
}

// 全部组织列表 请求出参
export type GetOrganizationListResult = {
  //
  id: number;
  //
  organizationCode: string;
  //
  organizationName: string;
  //
  parentId: string;
  //
  parentCode: string;
  //
  rootCode: string;
  //
  level: number;
  //
  isLeaf: boolean;
  //
  sort: number;
  // 公司名称
  companyName: string;
  companyAddress: string;
  contact: string;
  contactEmail: string;
  contactPhone: string;
}[];

// 获取省市区 返回参数
export type GetCountyResult = provinceType[];

export interface provinceType {
  province: string;
  provinceName: string;
  cities: cityType[];
}

export interface cityType {
  city: string;
  cityName: string;
}

interface TreeData {
  id: string;
  name: string;
  children: TreeData[];
}

export interface IUnitResult {
  id: number;
  dataType: string;
  dataGroup: string;
  dataCode: string;
  dataValue: string;
  dataDesc: string;
  sort: number;
  parentId: number;
}
export interface IAuditRemind {
  dataRequestCount: number;
  factorCount: number;
  businessOppoCount: number;
  opinionCount: number;
}

export interface IAuditListItem {
  userId: string;
  organizationName: string;
  realName: string;
  email: string;
}

export interface SystemDictResult {
  id: number;
  dataType: string;
  dataGroup: string;
  dataCode: string;
  dataValue: string;
  dataDesc: string;
  sort: number;
  parentId: number;
}

/**
 * 查询整车工厂集合 返回参数
 */
export interface GetListFactoryResult {
  id: string;
  organizationCode: string;
  organizationName: string;
}
